/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package memsim.instructions;
import memsim.RegisterHandler;
import memsim.MemoryManager;

/**
 *
 * @author joe
 */
public class LDR {

    public void loadRegister(int reg, int address, RegisterHandler rH, MemoryManager mM){

        String s = mM.getValue(address).toString();


        rH.setValue(reg, Integer.parseInt(s));
    }

    public int loadRegisterPassInt(int reg, int address, RegisterHandler rH, MemoryManager mM){

        String s = mM.getValue(address).toString();


        int pass = Integer.parseInt(s);

        return pass;
    }

}
